﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ElevatorEmulator
{
    /// <summary>
    /// Interaction logic for AddElevator.xaml
    /// </summary>
    public partial class AddElevator : Window
    {
        private Config owner;
        public AddElevator()
        {
            InitializeComponent();
        }
        public AddElevator(Config owner)
        {
            InitializeComponent();
            this.owner = owner;
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            owner.AddElevator(txtForbidenFloors.Text);
            this.Close();
        }
    }
}
